Fix NPE during incremental build