protected function getMessagesFromContainer()
    {
        $container = $this->getContainer();

        $namespaces = array();
        foreach ($container as $namespace => $messages) {
            if (isset($this->messages[$namespace])) {
                $this->messages[$namespace] = array_merge($this->messages[$namespace], $messages);
            } else {
                $this->messages[$namespace] = $messages;
            }
            $namespaces[] = $namespace;
        }

        foreach ($namespaces as $namespace) {
            unset($container->{$namespace});
        }
    }