Weird difference in total results when executing directly against REST or through Java API