Fix bug for package inspector

The packagename was not correctly modified in the recursion of entity
scanning.