Fixed bug from #21206.

Added test to verify an empty label performs discovery on the current
working directory.