This is not for immediate commit.
the patch XTENLANG-3036-2.patch highlights the issues that cause compilation failure on ADA_037f.
More specifically: (a) I have forgot the local variable check in the previous patch.
(b) local variable check did not work because of inconsistencies in name and flag assignment in LocalDef and LocalInstance objects.
NOTE: this patch is not ready for commit as is, but feel free to use it as inspiration for a better fix.