[BUG #8137] Changed private "__compare" functions to protected