Move package resolution to semantic phase