Bug 7671 - internal line numbering is screwed in subshell

Summary: internal line numbering is screwed in subshell