registry: Avoid mapping registry return codes: return the right value in the first...