Initialize usedMappers before checking

The initialization of usedMappers tries to prevent duplicates within the mapper hierarchy, but searches for these duplicates in mappers that may not yet have been initialized. This simple check makes sure that the parent mappers have the usedMappers array initialized before checking for duplicates.