Issue #2349605 by larowlan: Fixed EntityReferenceItem is fragile about entity save order.