2887: Fix bug with minpoly()

Make sure multinomials are expanded.
First, this is important for following the right code path.
Second, this ensures that mapping.values() is actually a list of polynomials (otherwise it could contain roots).
Merge pull request #2028 from katjasophie/2887_minpoly

2887: Fix bug with minpoly()