I think this doesn't harmonize with what is done in line 254: 

    if (!$config['enabled']) {
        $container->getDefinition('profiler')->addMethodCall('disable', array());
    }