Dispatch on key type for slicing rather than isinstance checks
Assign self.dialect earlier in the constructor