Extract sandboxing context as a series of encapsulated contexts.