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

Fixes issue #1610

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>