ir: Return store on add functions
semantic: Make sure to resolve unused aliases
test: Add unused alias bugs test