Fix first/last button to compare raw DOM elements.