I found a bunch of further bugs while trying to solve this. I close this one and open a new more complete PR.