Compiler [Typechecker]: Support casting to attributed types. Also: Avoid complaining about assigning deprecated values to deprecated variables.