add function test for complex dereferencing (json-patch)