clear out unused masterstate function
Fix #7526

This should prevent already loaded mods from being reloaded from the
top level of the matches