avoid infinite loop in mapPrototypes