wait: fix false timeouts when using wait_event_timeout()