The fix is in the devel and beauty branches.
This is not the first time I have forgotten that s[len(x):] is not the same as s.lstrip(x) :-)
@test SyntaxSanitizer is a strong, elegant, extensible unit test.
It tests round-tripping in the SyntaxSanitizer class for all of its descendant nodes. To add a new test case, just copy the failing tree as a direct child of @test SyntaxSanitizer.
Edward