Nothing wrong with 4 levels of nesting.
Pascal compilers that correctly implement expression parsing have, IIRC, 5 levels (one level for each operator precedence level.) See the P4 and P5 Pascal compilers among others.
It seems programmers who usually show some concern (or at least desire) to properly localize data seem unable to apply the locality concept to code.
Go figure!.
However, there is a potential problem with nesting that gets worse as the nesting gets deeper and that is the time it takes to access variables at the higher levels. It should also be noted that is a problem that is usually very easy to avoid.