Fix use after free errors in xlat.c