Fix a bug in the recompilation checking logic.