Fix messages index cache update under some conditions (e.g. proxy) (#1489756)