Kilmarnock boss Derek McInnes bizarrely got sent off for crossing the touchline and kicking the ball while it was still in play against Dundee.