Refactor handling of $localcfg and fix OnlyIncludeCircMods fetching CircMods wrongly.