index: hoist the `lastBlock` variable out