subkey_found did not search for _all_ sub keys.

diff --git a/misc/registry.c b/misc/registry.c
index f163ae0..1417845 100644
--- a/misc/registry.c
+++ b/misc/registry.c
@@ -433,11 +433,10 @@
  */
 static int subkey_found(LPKEYSTRUCT lpcurrkey, LPKEYSTRUCT lpkey_to_find)
 {
-	if (lpcurrkey == lpkey_to_find)
-		return 1;
-
 	while (lpcurrkey)
 	{
+		if (lpcurrkey == lpkey_to_find)
+			return 1;
 		if (subkey_found(lpcurrkey->nextsub, lpkey_to_find))
 			return 1;