correctly calculating back-referenced formulas