I figured it out. I don't use TrackIR and that's why I didn't notice the bug at first.
There are limits (in aircraft's xdp file) specifying how much pilot's head is allowed to turn, apparently to prevent padlock mode from tracking enemies through cockpit floor or doing 360 degree head rotations:
<PadlockLimit AzimuthMin="-150" AzimuthMax="150" ElevationMax="90" ElevationMin="-55"/>
These limits are also enforced when you use keyboard to rotate cockpit view (keyboard only works if TrackIR is not enabled).
However as I see now when you use TrackIR thse limits are supposed to be ignored. CFS3 accepts any view direction that TrackIR software provides.
Now, since I had to replace a chunk of code related to viewpoint calculations and didn't know about this feature I implemented my cockpit view enhancements in a way that those limits are always respected, even for TrackIR users.
It is not a problem to fix, will release a new update in a few days.