In reply to dave_59:
Nice and clean workaround. Just that we need to allocate memory to dynamic arrays.