New richlet mapping can be added only if associated richlet exists

It is possible the richlet gone between checking if it exists and adding
the new mapping, so the checking and adding the mapping must be
synchronized.