rts/idris_rts.c: Fix referenced after allocation that may moved away

Fixes issue #1610

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Merge pull request #1636 from alterapraxisptyltd/issue-1610

rts/idris_rts.c: Fix referenced after allocation that may moved away