md: Fix some bugs in recovery_disabled handling.