Fix a bug where an annotation view variable was incorrectly re-declared which caused annotation views to not appear in some cases. This also refactors the guard that spot checks that annotation view are or are not visible.