Fix nested view generate order to make compile work correctly