Fixes an error when translating an entity not yet flushed