The nonexistence of certain generalized polygons