Weird problem in calculating sum of two computed field values as another sum
I think this suggestion works

Go to the computed filed settings of G. Uncheck "Store value in the database" option might solves your problem. (If not necessary to store)