Fix incorrect optimization with blend modes