ensure a maximum depth of 3 tags, and that moves are valid