Fix jQuery #13281: only use sourceIndex for connected nodes