cleanupFailedPlan will now clean all plans of size 2 or more

cleanupFailedPlan will now clean all plans of size 2 or more. As
a result, it will now sometimes finish on state machines with
3 states.