Switched to instance data tree walking

Had pseudo instance tree walking before. However, it turned out not to
be possible to get to the right branch of the instance tree. This should
change to instance tree walking. Missing tests to validate.