there must be really something wrong if the DR-07 is set into line in. you are recording on the line-in - there should be no handling or grabbling noise from the Dr-07 on the recording, Or maybe it´s a sign of a really bad connection issue (bad cable / Connectors etc ) so there might be some buzzin or clickin when you are moving the cable.
Check another Cable, if the Tascam is really set to Line In Recording.
If the Phones / Aux out on the keyboard is one jack maybe a menu option has set to use it for headphones or aux.