I was referring to instanceof on $this->kernel for the setUsePagelayout() call, thought that was clear when reading the full diff.