Check for references rather than line length.

Check me, but this should fix the issue where blocks with comments but no references produce a reference.