Fix end-of-defun bug for some kinds of comments, struct tags; add tests