Strange,have just checked both birth enteries in GRO Regimental Birth Indices as found on Find My Past,looking at the printed lists,and both enteries for Mary Ann Hayes b 1866 Portsmouth 87th Foot,and David H Hayes 87th Foot b Rangoon 1862 have identical references,,,,, vol 1342,page 29.,,,,,
Suggest you find someone to look up David H Hayes birth 1862 Rangoon reference on another family history search site,as I only have FindMyPast. Ancestry may have it, in case FindMyPast have made a mistake.
Brionne.