More batch context switching tweaks.
Extend ISPN-4196 workaround to include Cache.size().