Is this not what jspEnsureIsPrototype is trying to do?