Stop using pop, fix bug in relative state https://www.w3.org/Bugs/Public/show_bug.cgi?id=26553