fix: setting minpoly twice with invalid minpolys (tr.579)