Runtime: Make check_destructed() a function. This makes it possible to use array_set_index{,_no_free}() from modules.