avoid splicing when index is undefined
Merge pull request #190 from chieffancypants/unlinkInverse-bug

unlinkInverse: avoid splicing when index is undefined