Fix end-of-playback logic for in-progress recordings.

The bug was introduced in 91ec76e8afba1833a7cb64f17429910f29b39404 and
found by Stuart M.