Workaround for bash's xmalloc bug