The line
$functionsearch:init?[] = $CFG->profilelocation . "profile.config.php";
in /mod/profile/lib.php does not work properly if some other module has already loaded this file (as does my prfext module, which runs first because it is lower alphabetically).
If profile.config.php has already been loaded, this second load in /mod/profile/lib.php puts duplicate entries in $dataprofile:details?.
This line should be replaced by
require_once($CFG->profilelocation . "profile.config.php");
There is a similar problem with the loading of invite.config.php in the invite module. This should also be loaded using require_once.