Issue #3393008: 馃攢 Fix OptGroupEntityReferenceSelection::getReferenceableEntities() error, and generally refactor function to use continue to move to the next element in foreach() loops so code is less indented.
Closes #3393008