Yes, using Session in this case is a bad practice.
There's a more simple way.
just add a new variable to your page code like this way:
private bool rebuildRequiredFlag = false;
private void MyNodeMovedHandler(...) {
rebuildRequiredFlag = true;
}
protected void Page_Load(...) {
if (rebuildRequiredFlag)
{
// rebuild here
}
}