Make subcontext extraction stop at parents

Fixes #32