[SP-677] - backport for [MONDRIAN-1750].  cherry picking 8ea52ee9d8e1cb78a1bca9a6145f51936bae2192 which was for [MONDRIAN-936] and partially fixes [MONDRIAN-1750]
[SP-677] - backport for [MONDRIAN-1750].  cherry picking 56b4ec43f50fbc414490c531d2decb5f6a032a7d and  4e5d927239cd0a083f999612d1e85bde2e80a0eb which were for [MONDRIAN-1226] and partially fixes [MONDRIAN-1750]
[SP-677] - backport for [MONDRIAN-1750].  cherry picking
e411d5b5a279725c82f8485e63e70c8d634cb740
 which was for [MONDRIAN-1587] and partially fixes [MONDRIAN-1750]
[SP-677] - backport for [MONDRIAN-1750].  cherry picking
df26e7459bc838236afa84d205abe83f32a5be0b
which is only the test case.  The issue was fixed in 3 previous cherry-picks.
Merge pull request #237 from kurtwalker/SP-677

SP-677