Fix issue where multiple associations to the same section caused the count to be incorrect. Fixes #2083