All I had to do was post a problem to figure out what it was.
There was whitespace before the #### heading because I was converting things out of dotted outline to headings for referentiality. Of course an indented heading doesn’t go into the Outliner – though it looks like it does get properly highlighted in the Editor.
That’s a problem on me, though maybe someone else’ll have the good luck to find my problem and have it answer theirs in the future.