Fixed bug with aliasing nested functions