stackPages issue

Hello there,
I am using stackPages for my app. The problem I am having is there are more than one same pages stacked.

Home > Detail1 > List > Detail2 > List

I want to check if the page is stacked in history, remove the previous page and load a complete new page.