Issue #2514212 by Berdir, tduong, chx: Entity::getEntity() does not correctly deal with an existing ID mapping without a destination ID