Fixing ticket 10174 (rebased onto develop)



This is the same as gh-212 but rebased onto develop.

----