Fixed this, I think (some "inner" patches that were missed). Not 100% sure what the error that osmi is complaining about though in all cases. JOSM does not complain, and openstreetmap-carto seems to render fine.