Add close() to parent contexts on shutdown