Overwrite source position of variables when they are being replaced

Closes #145