Quick fix for the case where generated comment is the terminal leaf in a subtree that is followed by a trailing comment. Partial for #3034
Fixes #3032