Add reviveExternalObject to deal with external objects

Instead of blindly failing when an external object is not found in the user objects, reviveExternalObject is called to deal with it.
Default implementation is the failure mentioned above, but it is now easily overridable.