pop the loop block even for infinite while loops (closes #23048)