You are on to something, I however managed to solve it with a variance of this;
Re-cald should be active, otherwise X is not upadted when A+B change (this part works fine). However when hide/show of a section somewhere for some reson resets the calculation of X it therby changes X (not A or B).
Therefore I made a rule on X that when ...