Improve error messages detecting R in registry.