refactor containment limit setting.

no need to cache it so low in the stack.