[[ Bug 14211 ]] Throw an execution error when using 'next line of ...'

Bug fix for 142111 ported to 6.7, to avoid having 6.7 accepting a script that does not execute on 7.0 (that was a long-lasting bug, only putting a random line random when accessing the 'next line of').