Forum .LRN Q&A: sort key bug that affects forum threading and subgroups hierarchy

I was having trouble with duplicate sort keys with both forums and
subgroups. The 16th first-level message in a forum would not port.
Post-migration, there would be communities in the database that had
the same sort key.

This is the (Oracle) patch I used:

File: /packages/acs-kernel/sql/oracle/tree-create.sql
PL/SQL function: int_to_hex
Problem: select int_to_hex(16) returned 1 instead of 10

Change the following:

    while v_remainder > 0 loop

To:

    while v_current_pow >= 1 loop

Reasoning:  Problem occurs when the input is a power of 16. When
v_current_pow = 1, v_remainder = 0.  The last loop doesn't execute
and the last 0 is not appended to the result.

Ben checked this in today. Thanks for hunting this down!