fix Issue 12131 - Struct assign purity error
Merge pull request #3301 from 9rnsr/fix12131

Issue 12131 - Struct assign purity error