The interplay of blocking properties with charge and potential redistribution in thin carbon-doped GaN on n-doped GaN layers