Make invalidChars as a module scope private variable suggested by Randy.