[Fix RM 8224] - undefined method `include?' for nil:NilClass

Bug due to registry_enumkeys returning nil.
Land #2230, enum_shares nil deref

[FixRM #8224]