Fix sourcemap tests. Closes #1692