Add tests for `haxe.Rest` argument checks for #3238