Index: genshi/template/markup.py
===================================================================
--- genshi/template/markup.py	(revision 896)
+++ genshi/template/markup.py	(working copy)
@@ -278,13 +278,11 @@
                     if 'not_buffered' not in hints:
                         content = list(content)
 
-                    if tail:
-                        for test in [mt[0] for mt in match_templates]:
-                            test(tail[0], namespaces, ctxt, updateonly=True)
-
                     # Make the select() function available in the body of the
                     # match template
+                    selected = [False]
                     def select(path):
+                        selected[0] = True
                         return Stream(content).select(path, namespaces, ctxt)
                     vars = dict(select=select)
 
@@ -300,6 +298,18 @@
                             ctxt, start=idx + 1, **vars):
                         yield event
 
+                    # If the match template did not actually call select to
+                    # consume the matched stream, the original events need to
+                    # be consumed here or they'll get appended to the output
+                    if not selected[0]:
+                        for event in content:
+                            pass
+
+                    # Let the remaining match templates know about the event so
+                    # they get a chance to update their internal state
+                    for test in [mt[0] for mt in match_templates]:
+                        test(tail[0], namespaces, ctxt, updateonly=True)
+
                     break
 
             else: # no matches
Index: genshi/template/tests/markup.py
===================================================================
--- genshi/template/tests/markup.py	(revision 896)
+++ genshi/template/tests/markup.py	(working copy)
@@ -708,7 +708,26 @@
             </body>
         </html>""", tmpl.generate().render())
 
+    def test_match_without_select(self):
+        # See <http://genshi.edgewall.org/ticket/243>
+        xml = ("""<html xmlns:py="http://genshi.edgewall.org/">
+          <py:match path="body" buffer="false">
+            <body>
+              This replaces the other text.
+            </body>
+          </py:match>
+          <body>
+            This gets replaced.
+          </body>
+        </html>""")
+        tmpl = MarkupTemplate(xml, filename='test.html')
+        self.assertEqual("""<html>
+            <body>
+              This replaces the other text.
+            </body>
+        </html>""", tmpl.generate().render())
 
+
 def suite():
     suite = unittest.TestSuite()
     suite.addTest(doctest.DocTestSuite(MarkupTemplate.__module__))

