Sometimes one can't see the forest for the trees - or can't see the tree for the forest.
The problem you're describing is relatively simple. It's not a logical problem on a scale, where you have to setup different circumstances to analyze. From my viewpoint, all you had to do was, slowly single-step through the code in a debugger (I use Classic99) - and to your surprise you'll see that the LI R1,LIB4 doesn't execute, but rather the next instruction in your program executes. That should quickly lead to the Aha! moment. Of course set a breakpoint just before the mysterious code.
The disadvantage compared with modern programming is, that you have to have the source code side-by-side (with the debugger). Nobody said it was going to be easy.