make shared_context etc. adhere to --toplevel-dsl flag