Use a concurrent map for sourceFiles.

* removed some `synchronized` blocks that shouldn't be necessary now

Fixed #1001859

Should be backported.