Fixed some issues with the handling of variables in the diff panel.