@Override
	public boolean isVisible(LocationReference locationReference) {
		LocationReferenceEnvironment currentScope = this;

		do {
			ActivityLocationReferenceEnvironment environment = (ActivityLocationReferenceEnvironment) currentScope;
			if (environment == null)
				// some other type of environment
				return currentScope.isVisible(locationReference);
			if (environment.declarations != null) {
				for (LocationReference declaraton : environment.declarations.values()) {
					if (locationReference == declaraton)
						return true;
				}
			}
			currentScope = currentScope.getParent();
		} while (currentScope != null);
		return false;
	}