METAMODEL-46: Added Tomasz Guzialeks patch to fix this issue.