Fix circular block compare crash, CC#1049
Merge pull request #150 from ladislav/compare-crash

Fix circular block compare crash, CC#1049