Add hasChildren and tests for recursive _key logic

Adds hasChildren() property and some tests.