Nested discovery fixes

Sorry for the lack of tests.  Hopefully I'll get to this tomorrow.
Yeah, see commit message.  I'm not sure that this is appropriate.  I chose this because strings are generally our lowest common denominator in discovery.