Sorry guys, I screwed up. Mixed some versions and this patch doesn't really fix anything. It just reorganizes code. The tests already include one with this flow and works fine with the latest master. 