Fixes #770 (group stock counts by SC record)