more fixes to 'focus previously active node' feature, now also works when expanding and collapsing folders