The base and shift amount need to be integers, but not of the same type. This fixes #1296 and replaces #1297.