Prevent circular reference when checking for blend modes (issue 4370)

Fixes #4370.