For me the solution was to change the Data Type in the Parameters of the script to "Feature Layer".
In ArcToolbox, Right click on the model or script, choose Properties, click on the Parameters tab, and then for the affected parameter, set the Data Type to 'Feature Layer'.