2887: Fix bug with minpoly()