[DCOM-194] Fixed proxying magic getter with reference

This is a proposal for a fix for [DCOM-194](http://doctrine-project.org/jira/browse/DCOM-194) (and GH issue #276). This issue is important for us to be solved before 2.4.0 is out, since the base object class of Nette Framework, Nette\Object, uses this behavior, see https://github.com/nette/nette/blob/04e4e4b3ee36551fe99e63f91d9a839f7edc72ee/Nette/common/Object.php#L124-133.

(By the way, your Travis environment seems to be broken.)