Fix #13793. Correct source map generation bugs. Close gh-1275. (cherry-picked from commit 997da31121b9d084ccba05a9bb1e258c8c8faaf0)