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).