Corrected behaviour of RegOpenKey in case of failure.