bdeformatutil: Improve handling of comments