Calculation formulas are not properly restored, since they are not "normalized" (generating an Error in the gradebook).
In backup/backuplib.php the following code:
// use [idnumber] in calculation instead of giXXX#
does not have a correspondance in backup/restorelib.php
I suppose that the set_calculation(...) function must be called somewhere.