HDW: Clear some static analysis warnings from DKC.
HDW: Simplify an unusual for loop in DKC
HDW: Fix the case of wallet upgrades where the aesKey is provided.