Productivity alters the scale dependence of the diversity-invasibility relationship.