tests: remove leftover commented code
registry: fix device lookup

We were returning the wrong node. Add tests.