Move wait_and_ignore_interrupt function to before all uses of it (case 604543).