[#1656] Fix IndexOutOfBoundsException in MessageToMessageException