So are you saying that the codes don't log until you take it up to the limiter, after which point the RPMs are cut to 3k?
Just a few things to note, which you might not be aware of. The 5100 RPM limiter isn't a target engine speed, it's an absolute maximum speed, and shouldn't be reached except under extreme circumstances. This engine delivers full torque (of 500Nm) at just 1500 RPM, and peak power of 237 BHP at 4k RPM, so there's absolutely no need or benefit to revving beyond that point. It's a diesel which isn't designed to work like that. I believe the ECM could be putting it in limited performance mode, possibly to protect the engine from an abnormal drive cycle.
As for the fault.
I suspect there's an issue with the DPF as already suggested. At stupid high RPMs, it's upsetting the whole induction circuit, hence the random induction codes.
My advice would be have the DPF cleaned or replaced, or buy a vehicle that's actually designed to be driven like a sports car.