Fix #13793. Correct source map generation bugs. Close gh-1275.