Fixed #3536, implemented error message on wrong color definitions in heat maps.
Redid too specific fix for #3391.
Merge remote-tracking branch 'upstream/master'