Deep merge objects when dereferencing