Fix bug in the 'parseRegisterIndex' function.