Don't display unused declaration markers on non-primary documents

Fix #747.
Protect against exceptions in tag-based features

Use 'protectOrDefault' or `protect` wherever possible.
Possible fix for #790.
Try to pin Paket to 0.8.6 to fix AppVeyor CI build
Merge pull request #793 from dungpa/fix-unused-declaration-markers

Fixes for unused declaration markers