fix the search of multiple uses (realm=*) to not stop after the first realm

closes #12717

Change-Id: I64c814a9eaee2f341643074b697148d2d0c11275
Merge "fix the search of multiple uses (realm=*) to not stop after the first realm"