Introduce new scoped cache blocks for read combining - fixes bug with conditionals. Fixed bug with not generating write code for rate rule vars.