fixes passed by reference issue

Fixes https://github.com/phpDocumentor/phpDocumentor2/issues/859