Issue #2604602 by mikeker: ImageItem::generateSampleValue() throws "Call to a member function id() on a non-object" exception