Fixed bug where same types at different priorities were not resolving correctly