checking restart-required state, added test for repeated application of the same patch