[#31401] Fixed issue with  object being overwritten by string. (Fix #1446)