private void FillKeys(RegistryKeySnapshot snapshot, RegistryKey key)
        {
            if (key.SubKeyCount != 0)
            {
                RegistryKeySnapshotCollection children;

                children = new RegistryKeySnapshotCollection(snapshot);

                // ReSharper disable once LoopCanBePartlyConvertedToQuery
                foreach (string name in key.GetSubKeyNames())
                {
                    // HACK: Although I thought key names were unique, clearly I was wrong as the scan used to crash on
                    // HKEY_LOCAL_MACHINE\SOFTWARE\Yamaha APO which appears at least twice on my system, although RegEdit
                    // only shows a single copy

                    if (!children.Contains(this.GetShortName(name)))
                    {
                        RegistryKey subKey;

                        subKey = this.GetSubKey(key, name);

                        if (subKey != null)
                        {
                            RegistryKeySnapshot childSnapshot;

                            childSnapshot = this.TakeSnapshot(subKey);

                            children.Add(childSnapshot);
                        }
                    }
                }

                snapshot.SubKeys = children;
            }
        }