If a pwell is used it must be insulated from the p-substrate of the wafer, so My guess (@Tim Edwards?) it needs to be built inside a nwell + deep-nwell pocket. If this is the case the 'B' terminal must be connected to the surrounding nwell voltage ( >= resistor terminal voltages).