This happens when a comment is added on a context line that is >3 lines away from the modified line, but <=7 lines away (e.g. one click of the ... 'Show More Lines' context expander). Comments outside of this range appear correctly and don't get collapsed.