only need `base`, not `base != undefined`. But why is this needed in the first place, what testcase shows the problem?