This is an interesting hack and might be something we add to utils.

This solves the problem where instanceof would fail for some of our types (since they are created in the other frame)