Allow close to silently fail if the context is invalid