Fixed access to repo packages files when there is an overlay

eg. files/ could still be used if it didn't exist in the overlay

This should also fix #1391