Send along reference to PHPConstant with the restriction check.

This allows us to specifically reference `static::X` in gen'd code.