Hi,
Now that I have access to a system I could double check how filtering is done on ECC: and in fact the i_filter_mode is not the problem because filtering is done before the lines of coding you have identified. So I'd suggest to get help from a developer that will tell you the exact piece of coding where your conditions are not taken into account. In my system it is line 349:
Image may be NSFW.
Clik here to view.
Regards,
Nicolas.