Question: why it simplifies same term in denominator but not in the numerator?

Another very strange result from simplify.  Consider

simplify(a*f(x) + b*f(x) + a*g(x))

Which is what is expected. Now 

expr := a*f(x) + b*f(x) + a*g(x) + 1/(a*f(x) + b*f(x) + a*g(x));
simplify(expr)

gives

why?  I expected (a+b)*f(x) also in the first expression. Compare for reference the same thing in Mathematica where it does them both the same way:

You see it simplified it to (a+b)*f(x)+a*g(x) in both places as expected.

I tried using size option for simplify, but it had no effect.

How can one obtain same result shown above using Maple? And why it does not automatically produce this result?

Maple 2022.2

 

Please Wait...