After the next Ashes.
There's not a test standard keeper waiting to come in anyway, and don't say Carey his keeping is well- we might as well have Wade behind the sticks!
The problem with that narrative is many said Paine wasn't up to standard (he probably isn't) but sometimes you have to give someone a chance. Don't worry though, you can sleep well at night knowing the selectors won't pick Head or Carey.
I think you are right Paine will try to hold on until after the Ashes. I think Langer has gone all in on guys like Paine so I think as long as he is coach he probably holds his spot. As Captain and Keeper though Paine wouldn't want too many more bad days though as it will start to get a bit awkward.