Fix of segfaults caused by executable stacks caused by nested functions