Move package resolution to semantic phase
Fix debug printfs in access.c