The restructure in 03f565e4a481a92f897ca715dca0140ddc3da05d has major flaws and I have rewritten it again to actually work.