Made search more efficient in blockHasNoData and blockRequiresRotation