Fix hang in incremental build

Fix hang on incremental build
Merge pull request #73 from csrwng/fix_incremental_hang

Fix hang in incremental build