Fix a bug with len == 5.
Tested solving 14*14 Very Hard.