All of the items you listed can be used if no superior route can be found.
To over simplify, waze probably uses cost based analysis (like all other mapping software), where it gives a point value to every turn or road segment it tries to use. In this method, Turn restrictions, going against a one way, no entrance, etc. is calculated at a "higher" cost then the following what is known to be valid.
This is needed as otherwise you would never be able to route anywhere unless every road in between you and your destination had good directionality and turn restrictions already in place. Since Waze does not start out with that data, they allow the routing servers to attempt to drive you in ways that potentially might work, but just haven't been seen yet.
Per Dror, locking a road segment will give a higher cost to the turn restrictions in place. So I advise to use lock especially when their are turn restrictions involved.
My personal opinion is that the routing servers should never override a manually put in turn restriction, but may override a "no connectivity" restriction. But that is my two cents.