fix a bug causing ForeignValueError

...raised when a context variable is uninitialized and if the object is predefined