Issue with scope looping if not restricted to just classes (also
improves performance)