Dynamical errors in machine learning forecasts