[ticket/11535] Correctly merge avatar_errors array into primary error array

The $avatar_errors array needs to be merged into the primary $error array
before the group settings get applied. This is currently not the case.
Functional tests for this will be provided by PR #1401.

PHPBB3-11535
Merge remote-tracking branch 'marc1706/ticket/11535' into develop

* marc1706/ticket/11535:
  [ticket/11535] Correctly merge avatar_errors array into primary error array