In reply to Tapas:
You have to run more than 10 randomization’s to see it working. The mask becomes an unconstrained random variable, and there’s less than a 15% chance (37/256) that the mask has a continuous set of ones. See function in constraint - EDA Playground.