issue #22138: bugfix in getLastCommentString