Prevents moving into check.