Fix unexpected behavior with nested mappings

This little patch solves problem described by myself here #177.
I'm not sure that I do it right, but specs aren't broken.
Also I haven't add tests on this case, because of lack of time. But I can do this soon, in a few days.