Fix faulty regexp for check of variable names in versions >= 4.0