Fix #1723

(cherry picked from commit ec52cdbc6f13e632c0c1eb64d711c1049775fc76)
Test case for #1723

(cherry picked from commit 64e0ada3def45b73b2943fc07cb26c78793250c4)
Updated CHANGELOG
Regenerated build/