[minor] be more strict about removal of whitespace in structural elements, fixes #12