Properly handle -1 as a registry key root.