When an input variable name contains a non matched open bracket, we not only have to replace that with an underscore, but also all following forbidden characters.