LPS-43497 Index not updated when web content is published by scheduler

Hi Milen,

Could you check my changes and try if those works for you? I think this solution is more clear.

If you agree with those changes I'll send the pull to Brian.

Thank!!!,

Eudaldo.