Fix the logic that checks for existing reboot pending in reboot pending tests.