Properly update head_ready to avoid staying ready forever

I would appreciate a review on that one. Samuel, Romain, does the issue and fix look clear to you?