Why is `_packagesVisited` initialized twice?