[ticket/13229] Fix overloading memberlist with redundant SQL queries

PHPBB3-13229
Merge branch 'ticket/13229' into prep-release-3.1.0

* ticket/13229:
  [ticket/13229] Fix overloading memberlist with redundant SQL queries