Fix NullPointerException which is possible in concurrent builds.
Merge pull request #897 from lvotypko/concurrent-build