Smarter output of source maps.

Avoids to emit useless segments.