renderer: fix race condition in FlipPage