Fix potential function pointer index offset bug in loader