helper: don't strip casting in get_array_offset()