Fixed some bugs in MatchState#legal_actions