Instance.get: should only be recursive if it is an instance

Problem described on issue #2253.

This PR contains test unit and needed patches.

Not ready for merge yet.