Uncovered this bug running some additional engine tests. Backported the test here, and fixed the recording_canvas code.