Fix bug in object iterator

  if first body has no object, iterate on following joints.