[ticket/11362] Use container when available instead of creating a new instance

PHPBB3-11362