refactor include_blocks to ensure blocks are properly included in html scope