Make sure comment is assigned before reference, Fix #7083
Merge pull request #7087 from basepi/7083

Make sure comment is assigned before reference, Fix #7083