Fix errors when the filter api is unavailable.

Bug: 12757