Fixes #3309 - Support deep merging of hash and array structures in smart class parameters

This relates to feature 3636 which states a couple of changes to the way `lookup_keys` work
I'm creating a PR to get comments of this part of the change and to see that I'm in the right direction