EntityManager: getClosestEntity() implementation (expensive)