public function replaceContainerBlock(AbstractBlock $replacement)
{
$this->getBlockCloser()->closeUnmatchedBlocks();
$this->getContainer()->replaceWith($replacement);
if ($this->getTip() === $this->getContainer()) {
$this->setTip($replacement);
}
$this->setContainer($replacement);
}