Do move legality check before pruning.