This happens if second parameter is not passed to $this->container->get('form.factory')->create().
I tried to create a test case for it in Symfony\Component\Form\Tests\FormFactoryTest, but I get Symfony\Component\Form\Exception\FormException: Could not load type "text". Looks like there is no such type of tests, so probably some setup need to be done first.
I think this is critical bug in forms, and it exists for a while now.