Make sure comment is assigned before reference, Fix #7083