Implement a workaround for IsArrayObject being broken