Handle referrals and mappings separately during symbol resolution