Cleaned up FlattenSelectorCallback.