[DDC-2267] Allow EntityManager#flush($entity) to be called on entities scheduled for removal.
Merge branch 'DDC-2267' into 2.3