Merge pull request #884 from rainers/fix_13111

Fix 13111: GC.realloc returns invalid memory for large reallocation

Signed-off-by: Martin Krejcirik <mk@krej.cz>