fixed an issue where a lookup would fail due to recursive children

(cherry picked from commit 896896d9b73137aba16981107e363c91cc6583ac)
Merge pull request #300 from mancdaz/icehouse-inv-bug-fix

fixed an issue where a lookup would fail due to recursive children