[test] add testcase for immc parser bug even with globals

Also updated [GH #1095]