Add more tests for global tags, handling of nil global tags, and docs