Fix hashmap crashes with games that load modules

This should properly unload and reload the functions as necessary.

-[Unknown]