More informative message for existing resource_ids
Fix warning message for existing resource_ids.

- It now uses, more correctly, 'self.resource_id';
- It also shows the '__repr__()' of the referred object.