[COOK-2288] - use assignment and dont flatten in place
Merge branch 'COOK-2288'