ac/debug: handle index field in SET_*_REG correctly