Make object short notation work if there's a linefeed before end

Fixes #1923
Closes #1924