Fix the "indexPage" hook (see #5967)