filter keys mapping to themselves