Akila's comment looks promising:

Metalink says: "This bug exists in 8.1.7 only. If _db_handles_cached is non-zero (5 by default) and you are seeing ORA-4031s and after setting _db_handles_cached to 0 the ORA-4031s stop, you may be running into this problem. "

As this Db is 8.1.7 and we do get ORA-4031a after ORA-00604 then it might be a bug. (But as we upgraded from 8.1.5 to 8.1.7 shouldn't it have been a problem before?).

I'll monitor the situation after setting the undcumented parameter and let you know.