More defensive coding of objectcontexts