Fix previous fix for a bug when converting an internal entity prefix to the entity identifier