Fix #541: Make incremental optimizer honor clean
Merge pull request #601 from gzm0/clean-optimizer

Fix #541: Make incremental optimizer honor clean