Fix index check in `removeDefaultCapability`.
Merge pull request #93 from tildeio/fix-index-check

Fix index check in `removeDefaultCapability`.