Fixes tests to work with temporary last page detection hack