Checking for duplicates of an entity AFTER adding said entity

Same problem mentioned in the thread above.