fix incremental compilation when used multiple times in sequence