fix potential use-after-free issue

James,
this code doesn't look safe to me: ebne_planquadrat deletes the old grund_t, so using it afterwards is probably unsafe.
Philip