Fixing the detection of block-indent for an empty block

**Warning:** This branch should be rebased and merged after #147 is reviewed and merged into dev.