Duplicated semantic fixes

Hi Aras,

Some fixes for duplicated semantic detection (one to fix name aliasing, another to fix structure-in-structures not being recursed into).