Move filter inheritance code below `inherits` call