Emit the alias if it is indirectly used in export assignment

This change adds support for emitting the alias declaration if it is indirectly used in export assignment
Also enabled few test cases that werent running correctly
I do not think we reached a conclusion on this. Once we have unreachable code detection enabled we will not be able to follow that model. lets talk about it though.