ACCUMULO-1730 improvements

Cherry-pick @ericnewton's commit since it never made it to the backport branch. Correct start and end indices for AND and OR nodes.