I got this problem to happen to me without Jenkins and where rebuilding the local tree was not appropriate. I started to ask a new question after my Google-fu found nothing, and halfway through typing the question this question popped up as the top suggested result.
It was, but the accepted answer is useless. However, this -1 deleted answer was the correct answer. I could certainly improve the answer to explain why it works, but it will still be a -1 deleted answer.