Improved handling of block declarations