Added test for issue 573

https://github.com/doctrine/phpcr-odm/issues/573