In the context of a shared library, this might not be so bad advice. You don't know how you are going to be used (either by the program tat loads you or by another library loaded by the program).
In such an environment, it's much easier to accidentally create deadlocks that you know nothing about, because you can't predict the invocation pattern of all the libraries and applications potentially linking to you.
I see what you're saying, but that still doesn't mean it's so difficult to get right, it just means you have to think about lock ordering (or just avoid taking > 1 lock at the same time).
In such an environment, it's much easier to accidentally create deadlocks that you know nothing about, because you can't predict the invocation pattern of all the libraries and applications potentially linking to you.