View Template Filter not working

Hi, we are trying to create a dynamo script to speed up filter creation (we want to filter foundations by colors based on its bottom elevation). We have managed to create filters inside a view template, but for some reason only 3 of them are showing in the view, an the rest of them won’t work. The weird thing is that if i open the Filter, change the filter rule from OR, to AND and back to OR(so nothing have changed) The filter gets fixed.
Its seems to be a bug. Can anyone help me?
All foundation plan should be colored, but only first 3 filter worked!!

Post your dynamoscript. That´s necessary, or we can´t detect any error cause, due to this behaviour can have many various reasons.

E.g. if your filter colours the walls depending on it´s material name, it doesn´t work, if the material isn´t defined in the elements. I created a similar set of filter some time ago, which colours elements in plans depending on <MATERIAL_NAME>. (Filters are used in view template)

I’m a new user of this forum so I’m not allowed to upload information. But I leave my model, Dynamo Script and Video of the problem in the following link: DynamoFilterError - Google Drive