Terminate compaction recursion with `self`.
Compact alternation deeply.
Merge pull request #42 from robrix/terminate-compaction

Terminate compaction