I'm developing a simple UI5 project be able to learn how Router works.. In that process I'm faced with an issue related to Router events. I've three XML view which names are FirstPage, SecondPage and ThirdPage. The ThirdPage is implemented inside the other two pages as following code;

```
<mvc:XMLView viewName="SapUI5Tutorial.Application.Main.views.ThirdPage.view.ThirdPage"/>

```

For example FirstPage.xml

```
<mvc:View displayBlock="true" controllerName="SapUI5Tutorial.Application.Main.views.FirstPage.controller.FirstPage"
xmlns:mvc="sap.ui.core.mvc"
xmlns:core="sap.ui.core"
xmlns:l="sap.ui.layout"
xmlns="sap.m" height="100%">
<Page title="First Page" class="sapUiNoContentPadding">
    <subHeader>
        <Toolbar>
            <VBox width="100%" alignItems="Center">
                <Button text="Second Page Link" press="handleNavSecondPage"/>
            </VBox>
        </Toolbar>
    </subHeader>
    <mvc:XMLView viewName="SapUI5Tutorial.Application.Main.views.ThirdPage.view.ThirdPage"/>
</Page>

```

When I click "Second Page Link" button I'm navigating to SecondPage. But the ThirdPage is due to inside of SecondPage ThirdPage's Router function is running twice

ThirdPage's controller;

```
sap.ui.define([
"sap/ui/core/mvc/Controller",
], function (Controller, FragmentController) {
"use strict";
var base, oRouter;
return Controller.extend("SapUI5Tutorial.Application.Main.views.ThirdPage", {
    onInit: function () {
        base = this;
        base.getView().setModel(oModel);
        oRouter = sap.ui.core.UIComponent.getRouterFor(base);
        oRouter.getRoute("FirstPage").attachMatched(base.firstPagePatternMatched, base);
        oRouter.getRoute("SecondPage").attachMatched(base.secondPagePatternMatched, base);
    },
    firstPagePatternMatched: function (oEvent) {
        console.log(oEvent)
    },
    secondPagePatternMatched: function (oEvent) {
        //Due to the third page is used for inside two other pages (FirstPage and SecondPage) this function is running twice
        console.log(oEvent)
    }
});

```

});

How can I prevent running twice that Router event of ThirdPage ? Thank you for your helps