Fix occasional errors in get_array() when given an associative array