Improve constraint size check in Result.