@megies 
Ok, this should be now fixed by changeset 3608a2b, which uses a simpler approach.