Fixed bug in magic method __clone on doctrine entities.