Simply put, this statement:
$this->view->mheader = false;
Just nullifies your view variable with a name 'mheader'. That's it. Actually, it sets property mheader
belonging to a view object to false.
What you actually want here is to pass some value to the view component, not to false it / null it. You could do it with string. You could do it with a number (0) too.
I believe the general overview would be that the view component/service expects some value (i.e. string).
Boolean is more low level construct, which needs pure PHP to make use of it. Volt would ditch it.
Now why this works:
$this->view->setVar("mheader", true);
For a simple fact that this setVar method will keep value of the var no matter what the type of this var is.