Fix resizing for arbitrary lookup tables