Add test for deep indexed mapping + fixes according to new test