Trying to solve a Boolean algebra expression which simplifies midway down to
$$(Q \lor (M \land \lnot N \land \lnot G)) \land (M \lor N \lor G)$$
It seems the final result of the distribution should be
$$(Q \land M) \lor (Q \land N) \lor (Q \land G) \lor (M \land \lnot N \land \lnot G)$$
However, Wolfram Alpha lists the result (shown here: https://www.wolframalpha.com/input/?i=%28Q+%7C%7C+%28~G+%26%26+M+%26%26+~N%29%29+%26%26+%28M+%7C%7C+N+%7C%7C+G%29) as
$$(Q \land N) \lor (Q \land G) \lor (M \land \lnot N \land \lnot G)$$
How did the $$Q \land M$$ term get cancelled out?