Fixes #3848, #3309: Support deep merging of hash and array structures in smart class parameters

 Please enter the commit message for your changes. Lines starting