Fix hashmap crashes with games that load modules

This should properly unload and reload the functions as necessary.

At least, this fixes Valkyrie Profile.

-[Unknown]