A ribbon obstruction and derivatives of knots