Some flag should be moved into the current statement context instead of being treated as a global value.
$this->_inFuncCall
$this->_inControlStatement
$this->_inFunctionStatement
$this->_inInterface
$this->_justAfterFuncStmt
....
We should know if we are inside a function statement with the context.