Added test and fix for incorrect node count with aliasing