It is a second version of the earlier sent patch.
I've added more clear explanation what does it fix and why the issue happened in first
place.
Also I split the patch (the patch itself and two independent tests):
[PATCH v2 1/3] appliance: init: Avoid running degraded md devices
[PATCH v2 2/3] tests: md: test guestfish finds logical volume on md
[PATCH v2 3/3] tests: md: test guestfish finds md and LV devices in