depgraph: fix KeyError in select_atoms