Issue #3003298 by Mile23: Fix "Adding or retrieving messages prior to the container being initialized was deprecated in Drupal 8.5.0 and this functionality will be removed before Drupal 9.0.0." deprecation error