Fixes physics issues for ghost objects and kinematic rigid bodies introduced by previous commit.