Made page topid determination smarter about skipping dups when possible