regedit: Close the registry key handle in the read function instead of the parser.