I noticed invalid pairs page-revision in flaggedrevs table - they are old and different than in revision table.
https://quarry.wmflabs.org/query/40426
Recently I observed it on delete-restore (also moves may be involved; often to merge histories) operation on pages with already flagged revisions so when restored this table has not updated page id. It makes impossible to mark revisions on restored page (but marked previously) made before deletion.