Merge "Fix two minor RS bugs. 1: index set size was populated with bad value in java, 2: bad error check in uploadToBufferObject."