Backport vert-x/mod-lang-rhino#ffdc1e7e27cc77433dd0339e2d440c140974cadb