test_detect_motion_times_out_during_yield: Fix intermittent failure

This applies the same fix as 0d460f18 did to
test_detect_*match*_times_out_during_yield.