Core Image: Fix undefined index error