Hotfix for DDC-2230

See [DDC-2230](http://www.doctrine-project.org/jira/browse/DDC-2230) and commit messages