Act more safely when given incorrect types in the VM, and use some more optimisations to make up for it.