Just on a whim, I tried to load the database on a 7.4 server, and that query doesn't even work over there:
ERROR: operator is not unique: bit varying || "unknown"
HINT: Could not choose a best candidate operator. You may need to add explicit type casts.
CONTEXT: PL/pgSQL function "tree_right" line 12 at return