bug 59983: correctly update shared formulas when shifting rows. Thanks to Luca Martini for the initial failing unit test with test file and Chiara Marcheschi for the patch