Fixing a bug with multilevel lookup.

Error caused it fail after 1 level for searching, now should be
unlimited in depth.