Fix out of bounds access to the double regs array. Given the
code this looks correct, but could use review. The previous
was definitely not correct.