Fix for T46494 wasn't working properly when de-selecting faces, adjacent faces would remain selected but have unselected edges. Logic here is admittedly rather fragile since it relies on both selection functions and flushing afterwards.