Fix regexes not having the /g flag when reloaded from disk