Better handling of incorrect indentation in indent-based syntax. Closes #1736