A small update to the extends logic to allow nested blocks

Allows nested blocks to work correctly.