gvariant: Fix bounds checking in GVariant text format parser