diff --git a/tests/base.py b/tests/base.py
index 036515d..f274ed6 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -486,6 +486,29 @@
         self.changes[self.change_number] = c
         return c
 
+    def addFakeTag(self, project, branch, tag):
+        path = os.path.join(self.upstream_root, project)
+        repo = git.Repo(path)
+        commit = repo.heads[branch].commit
+        newrev = commit.hexsha
+        ref = 'refs/tags/' + tag
+
+        git.Tag.create(repo, tag, commit)
+
+        event = {
+            "type": "ref-updated",
+            "submitter": {
+                "name": "User Name",
+            },
+            "refUpdate": {
+                "oldRev": 40 * '0',
+                "newRev": newrev,
+                "refName": ref,
+                "project": project,
+            }
+        }
+        return event
+
     def getFakeBranchCreatedEvent(self, project, branch):
         path = os.path.join(self.upstream_root, project)
         repo = git.Repo(path)
diff --git a/tests/fixtures/config/branch-tag/git/org_project/.zuul.yaml b/tests/fixtures/config/branch-tag/git/org_project/.zuul.yaml
new file mode 100644
index 0000000..acbba6c
--- /dev/null
+++ b/tests/fixtures/config/branch-tag/git/org_project/.zuul.yaml
@@ -0,0 +1,9 @@
+- job:
+    name: test-job
+    run: playbooks/test-job.yaml
+
+- project:
+    name: org/project
+    tag:
+      jobs:
+        - test-job
diff --git a/tests/fixtures/config/branch-tag/git/org_project/README b/tests/fixtures/config/branch-tag/git/org_project/README
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/tests/fixtures/config/branch-tag/git/org_project/README
@@ -0,0 +1 @@
+test
diff --git a/tests/fixtures/config/branch-tag/git/org_project/playbooks/test-job.yaml b/tests/fixtures/config/branch-tag/git/org_project/playbooks/test-job.yaml
new file mode 100644
index 0000000..f679dce
--- /dev/null
+++ b/tests/fixtures/config/branch-tag/git/org_project/playbooks/test-job.yaml
@@ -0,0 +1,2 @@
+- hosts: all
+  tasks: []
diff --git a/tests/fixtures/config/branch-tag/git/project-config/zuul.yaml b/tests/fixtures/config/branch-tag/git/project-config/zuul.yaml
new file mode 100644
index 0000000..0ae6396
--- /dev/null
+++ b/tests/fixtures/config/branch-tag/git/project-config/zuul.yaml
@@ -0,0 +1,21 @@
+- pipeline:
+    name: tag
+    manager: independent
+    trigger:
+      gerrit:
+        - event: ref-updated
+          ref: ^refs/tags/.*$
+
+- job:
+    name: base
+    parent: null
+
+- project:
+    name: project-config
+    tag:
+      jobs: []
+
+- project:
+    name: org/project
+    tag:
+      jobs: []
diff --git a/tests/fixtures/config/branch-tag/main.yaml b/tests/fixtures/config/branch-tag/main.yaml
new file mode 100644
index 0000000..0ac232f
--- /dev/null
+++ b/tests/fixtures/config/branch-tag/main.yaml
@@ -0,0 +1,8 @@
+- tenant:
+    name: tenant-one
+    source:
+      gerrit:
+        config-projects:
+          - project-config
+        untrusted-projects:
+          - org/project
diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py
index 70d9211..54cf111 100755
--- a/tests/unit/test_v3.py
+++ b/tests/unit/test_v3.py
@@ -157,6 +157,18 @@
         self.assertIn('Unable to modify final job', A.messages[0])
 
 
+class TestBranchTag(ZuulTestCase):
+    tenant_config_file = 'config/branch-tag/main.yaml'
+
+    def test_negative_branch_match(self):
+        # Test that a negative branch matcher works with implied branches.
+        event = self.fake_gerrit.addFakeTag('org/project', 'master', 'foo')
+        self.fake_gerrit.addEvent(event)
+        self.waitUntilSettled()
+        self.assertHistory([
+            dict(name='test-job', result='SUCCESS', ref='refs/tags/foo')])
+
+
 class TestBranchNegative(ZuulTestCase):
     tenant_config_file = 'config/branch-negative/main.yaml'
 
diff --git a/zuul/change_matcher.py b/zuul/change_matcher.py
index 7f6673d..eb12f9b 100644
--- a/zuul/change_matcher.py
+++ b/zuul/change_matcher.py
@@ -69,6 +69,20 @@
         return False
 
 
+class ImpliedBranchMatcher(AbstractChangeMatcher):
+    """
+    A branch matcher that only considers branch refs, and always
+    succeeds on other types (e.g., tags).
+    """
+
+    def matches(self, change):
+        if hasattr(change, 'branch'):
+            if self.regex.match(change.branch):
+                return True
+            return False
+        return True
+
+
 class FileMatcher(AbstractChangeMatcher):
 
     def matches(self, change):
diff --git a/zuul/manager/__init__.py b/zuul/manager/__init__.py
index 6c72c2d..d205afc 100644
--- a/zuul/manager/__init__.py
+++ b/zuul/manager/__init__.py
@@ -853,20 +853,22 @@
             if dt:
                 self.sched.statsd.timing(key + '.resident_time', dt)
                 self.sched.statsd.incr(key + '.total_changes')
-
-            hostname = (item.change.project.canonical_hostname.
-                        replace('.', '_'))
-            projectname = (item.change.project.name.
-                           replace('.', '_').replace('/', '.'))
-            projectname = projectname.replace('.', '_').replace('/', '.')
-            branchname = item.change.branch.replace('.', '_').replace('/', '.')
-            # stats.timers.zuul.tenant.<tenant>.pipeline.<pipeline>.
-            #   project.<host>.<project>.<branch>.resident_time
-            # stats_counts.zuul.tenant.<tenant>.pipeline.<pipeline>.
-            #   project.<host>.<project>.<branch>.total_changes
-            key += '.project.%s.%s.%s' % (hostname, projectname, branchname)
-            if dt:
-                self.sched.statsd.timing(key + '.resident_time', dt)
-                self.sched.statsd.incr(key + '.total_changes')
+            if hasattr(item.change, 'branch'):
+                hostname = (item.change.project.canonical_hostname.
+                            replace('.', '_'))
+                projectname = (item.change.project.name.
+                               replace('.', '_').replace('/', '.'))
+                projectname = projectname.replace('.', '_').replace('/', '.')
+                branchname = item.change.branch.replace('.', '_').replace(
+                    '/', '.')
+                # stats.timers.zuul.tenant.<tenant>.pipeline.<pipeline>.
+                #   project.<host>.<project>.<branch>.resident_time
+                # stats_counts.zuul.tenant.<tenant>.pipeline.<pipeline>.
+                #   project.<host>.<project>.<branch>.total_changes
+                key += '.project.%s.%s.%s' % (hostname, projectname,
+                                              branchname)
+                if dt:
+                    self.sched.statsd.timing(key + '.resident_time', dt)
+                    self.sched.statsd.incr(key + '.total_changes')
         except Exception:
             self.log.exception("Exception reporting pipeline stats")
diff --git a/zuul/model.py b/zuul/model.py
index 8fe4d14..c1e1914 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -963,10 +963,10 @@
             return None
         return m
 
-    def addBranchMatcher(self, branch):
+    def addImpliedBranchMatcher(self, branch):
         # Add a branch matcher that combines as a boolean *and* with
         # existing branch matchers, if any.
-        matchers = [change_matcher.BranchMatcher(branch)]
+        matchers = [change_matcher.ImpliedBranchMatcher(branch)]
         if self.branch_matcher:
             matchers.append(self.branch_matcher)
         self.branch_matcher = change_matcher.MatchAll(matchers)
@@ -1121,26 +1121,8 @@
             joblist = self.jobs.setdefault(jobname, [])
             for job in jobs:
                 if implied_branch:
-                    # If setting an implied branch and the current
-                    # branch matcher is a simple match for a different
-                    # branch, then simply do not add this job.  If it
-                    # is absent, set it to the implied branch.
-                    # Otherwise, combine it with the implied branch to
-                    # ensure that it still only affects this branch
-                    # (whatever else it may do).
-                    simple_branch = job.getSimpleBranchMatcher()
-                    if simple_branch:
-                        if not simple_branch.regex.match(implied_branch):
-                            # This branch will never match, don't add it.
-                            continue
-                    if not simple_branch:
-                        # The branch matcher could be complex, or
-                        # missing.  Add our implied matcher.
-                        job = job.copy()
-                        job.addBranchMatcher(implied_branch)
-                    # Otherwise we have a simple branch matcher which
-                    # is the same as our implied branch, the job can
-                    # be added as-is.
+                    job = job.copy()
+                    job.addImpliedBranchMatcher(implied_branch)
                 if job not in joblist:
                     joblist.append(job)
 
