* mitigate refcell conflict in state diffing Also uses RefCell::get_mut in a few places. * Add test case