Improve handling of environments by the VM to allow detection of runtime environment-access errors.