Use the standard variable did_indent.
Thanks to Will Gray for reporting the bug.