Fix state_filter attribute validation for Depdency objects.

Fixes #6110