Is there a reason two different kanji sets might be used for the name of the same person? While trying to translate a little, and maybe improve my Japanese, I found two spellings for the name Ranmaru, and both are used for the same person (the historical figure Ranmaru Mori if it helps with the question). Although 蘭丸 is used, and shows as the normal spelling for him, I also saw 乱丸 used. I'm trying to figure out why.
His actual name was Mori Naritoshi (森 成利). As an upper-class boy he was given another name when he entered Oda Nobunaga's service, likely 乱丸 as can be gauged by literary evidence and apparently 乱 was a popular suffix to 幼名 (childhood names) in the Oda household. A book written after his death, by Kaibara Ekiken, used the kanji 蘭丸, and this became popularized thereafter and has stuck.
Other names: 乱、乱法師、長定、長康
Those of noble birth (and others who attained status from low birth) had plenty of names as they progressed through the ranks and became renowned. In this case, the kanji 蘭丸 came from a literary source who was likely either trying to be indirect by not using the proper name or simply found this kanji more to his liking.
As an example, other names for Miyamoto Musashi: 藤原玄信、新免武蔵守、新免玄信、新免武蔵、宮本二天、宮本武蔵、【辨助、弁助・弁之助 - Childhood names】.
See here for more information about naming conventions.