Nested discovery fixes

Sorry for the lack of tests.  Hopefully I'll get to this tomorrow.
seems like we shouldn't assume that `[]` and `()` are empty sequences of `string`s