This is needed to compile with HaxeFoundation/haxe#8422 because abstract implicit casts are not transitive.