Umbraco $currentPage Not Updating Using NiceUrl
===


I have a simple Umbraco macro that lists out some nodes much like the following:

<!-- language: lang-xml -->

    <xsl:template match="Retailer">
        <td>
          <a href="{umb:NiceUrl(@id)}" class="read-more">Visit this store</a>
        </td>
    </xsl:template>

And this gives me my table cell with the url as I want. The issue comes when I click the urls. The first click on the page load takes me to the correct page. If I then return to the page that lists the urls using the back button and click a second url it shows me the content of the page I had just gone back from.

The url on the second (and subsequent) click is correct.

The content for the pages that I am clicking into is generated by a single XSLT macro - there is no specific Masterpage content for these node types. The macro for this page is basically like this:

<!-- language: lang-xml -->

    <xsl:template match="/">
            <xsl:variable name="retailerNodeId" select="$currentPage/@id" />
            <xsl:variable name="retailerProducts" select="myProductLib:GetProductsForRetailer($retailerNodeId)"/>
            <table class="products">
                <tbody class="retailer">
                    <xsl:apply-templates select="$retailerProducts/RetailerProducts/retailer" />
                </tbody>
            </table>
    </xsl:template>

The important thing being that all the content is being driven by `$currentPage/@id`

Is this a bug with Umbraco not setting `$currentPage` correctly on subsequent visits? Is there some way I can debug this to get further information?