kafka-861; IndexOutOfBoundsException while fetching data from leader; patched by Sriram Subramanian; reviewed by Jun Rao and Neha Narkhede