Fix ensure_loaded for local packages.
Remove useless code.
Remove list from hash prior to modifications.