Ah, so once again, we have a situation where the documentation describes the use of an elegant algorithm, but the actual implementation is a random pile of hacks and heuristics slapped together by someone who seems not to have really understood what they were doing.