added a typecheck to the replacementAst, typechecking is needed to fill the declaration use map...
Merge remote-tracking branch 'origin/master'