fix regex globals ($1, etc) breaking when using lineprof in regexp mode