Add an ugly hack to make capability <-> pointer casts a nop when they are both the same thing.