What is more preferred name when ester is present as junior functional group bis-carboxylic acid? (refer the image attached):

  1. to count carbon of ester and consider two branches on it (one oxo and other like methoxy).
  2. to consider whole ester group as branch.

(According to me answer by first method: 4-(formyloxy)-4-oxobutanoic acid and by second: 3-(formyloxycarbonyl)propanoic acid) please correct me if I'm wrong.