Added invariant validator to prevent setting path and limit to context.