(by Yuri Robbers) It does not matter much where the grave is! There are only two places where the treasure can be. If you construct a square with the two trees at two diametrically opposite corners, then the treasure can be on either of the other two corners. There is a degenerate case where the grave would be on the same line as the trees. in this case the treasure would be buried exactly between the trees. This degenerate case is, however, excluded by the wording of the instructions, since in that case there would not be a left and a right tree.
Proof with vectors: Let the unmarked grave be the origin. Let A and B denote vectors to the two oak trees. The first flag is at A + iA. The second flag is at B - iB. The mid-point is ½ (A + B) + ½ (A - B)i, which may be rewritten as A + ½(B - A) - ½(B - A)i. Note that -iX denotes counterclockwise rotation of vector X by 90 degrees. Now the last expression has three summands, which can be visualized as follows: "A" denotes moving from the unmarked grave to the left oak tree, "½ (B - A)" denotes moving half the distance between the two oak trees from A to B, and "- ½(B-A)i" denotes turning counterclockwise by 90 degrees and moving the same amount as the previous step. Finally, the unmarked grave could be on either side of the line joining A and B. So there are two points where the treasure might be.