I had the same problem. Oracle's solution was to use two listeners, one for the 9i databases, one for the 8.1.7 databases.