Fixed runtime error with destructuring of spreads (#1945)