Improve (?) the console.x regex to ensure we're inside a script tag.

Further addresses #432