I think commit 72e2a4a6482c0115d9925d271016a3e818e1804 ends fixing this. I'm closing this ticket but please reopen if you still see issues.