#5952 - fix infinite loop when disabling > 50 annotations or metadata