Reverting change causes the entity to be resolved to the wrong type/object

Reverting change 9ac6f50d4501a9268c8f67d36f04731893d406de which causes the entity to be resolved to the wrong type/object.