BTR\garbage_collect() fetched parent, left, gc and right pages to do its job.
Parent page number is passed into garbage_collect() as parameter and this page is fetched as pag_undefined with verification after the fetch that it is still belongs to the index.
Left page number was stored in variable while gc_page was locked. When left page is fetched it is assumed that its is still index page but this is wrong assumption.
At this point we can have "wrong page type" error.
Solution is to fetch left page the same way as parent page - as pag_undefined with verification it is still belongs to the index.
gc_page and right pages fetched as pag_index pages and it is safe as page numbers got from the currently locked left and gc_page accordingly.