A product list CMS widget rendering failed: «Error filtering template: Unknown column 'e.category_ids' in 'where clause'» (and my fix)

Error filtering template: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘e.category_ids’ in ‘where clause’, query was:

SELECT COUNT(DISTINCT e.entity_id) 
FROM 
		`catalog_product_entity` AS `e` 
	INNER JOIN 
		`catalog_category_product_index` AS `cat_index` 
	ON 
			cat_index.product_id=e.entity_id 
		AND cat_index.store_id='1' 
		AND cat_index.visibility IN(2, 4) 
		AND cat_index.category_id='3' 
	INNER JOIN 
		`catalog_product_index_price` AS `price_index` 
	ON 
		price_index.entity_id = e.entity_id 
		AND price_index.website_id = '1' 
		AND price_index.customer_group_id = '3' 
WHERE (((IFNULL(`e`.`category_ids`, 0) = '6') ))

The result-set before the WHERE expression does not conain the category_ids column:

See also:

How to fix

The source of the bug is the following commit:

https://github.com/magento/magento2/commit/ad6be9978e5a2cc22b639acdd5216ddc7c44c900

You can fix the bug by reverting the commit.
Remove the following lines:

https://github.com/magento/magento2/blob/ad6be9978e5a2cc22b639acdd5216ddc7c44c900/app/code/Magento/CatalogWidget/Model/Rule/Condition/Combine.php#L74-L74

https://github.com/magento/magento2/blob/ad6be9978e5a2cc22b639acdd5216ddc7c44c900/app/code/Magento/CatalogWidget/Model/Rule/Condition/Combine.php#L76-L76

A similar issue:
https://github.com/magento/magento2/issues/3971

Fixed on 2016-05-12 in the developer branch:
https://github.com/magento/magento2/commit/f6c1d936dbaa9e5fc31c8d46b51fc2bb244f365c