Yes exactly this
and this
What MIGHT work is that you try to rename the function in the target database instance just prior to restoring. But I have not tested that.
So (on the target db)
ALTER FUNCTION entity2char RENAME TO e2c_outoftheway
- restore
ALTER FUNCTION entity2char RENAME TO e2c_from_backup
ALTER FUNCTION e2c_outoftheway RENAME TO entity2char