Backport !1632 Fix large writes in gfileutils to glib-2-64

Trivial backport of !1632 (merged) to glib-2-64.

Merge request reports