yes I looked in the source code and I think the reality clashes with the documentation, which says about loops: "...These work from the command line but are primarily intended for use within NSH scripts". I think the code expects loops only in scripts files and not directly in console, because one of the conditions for this error is "np->np_stream == NULL", which I assume means that no script is being processed.
Look at the function nsh_loop() in apps/nshlib/nsh_parse.c. The error is coming from line 1842
Since the logic there depends on fseek() (line 1932), I would say it could only work on a script executed from a file.