Lock the attribute mapping, since it can be accessed from multiple threads.