dynamics_solver: fix crashbug

Ignore joint that does not exist (including the virtual joint if it is part of
the group).