Avoid excessive logging in filter_func
Revert "Use strcasecmp instead of comparing characters"

This reverts commit 7b3276ffab8b576a4b9201b3203ddeb4dd24f718.