Make (un)expanding directories work by rerendering things when necessary.