Index: src/report/standard-reports/advanced-portfolio.scm
===================================================================
--- src/report/standard-reports/advanced-portfolio.scm	(revision 16566)
+++ src/report/standard-reports/advanced-portfolio.scm	(working copy)
@@ -190,12 +190,6 @@
   (define (split-account-type? split type)
     (eq? type (xaccAccountGetType (xaccSplitGetAccount split))))
 
-  (define (same-split? s1 s2)
-    (string=? (gncSplitGetGUID s1) (gncSplitGetGUID s2)))
-
-  (define (same-account? a1 a2)
-    (string=? (gncAccountGetGUID a1) (gncAccountGetGUID a2)))
-  
   ;; this builds a list for basis calculation and handles average, fifo and filo methods
   ;; the list is cons cells of (units-of-stock . price-per-unit)... average method produces only one
   ;; cell that mutates to the new average. Need to add a date checker so that we allow for prices
@@ -343,7 +337,7 @@
 			  ;; If this is an asset type account for buy or sell, then grab a 
 			  ;; currency and a txn-value for later computation
 			  (cond
-			   ((and (not (same-account? current (xaccSplitGetAccount s)))
+			   ((and (not (equal? current (xaccSplitGetAccount s)))
 				 (not (or (split-account-type?
                                            s ACCT-TYPE-EXPENSE)
 					  (split-account-type?
@@ -355,7 +349,7 @@
 			    (set! txn-date (gnc-transaction-get-date-posted parent))
 			    (set! pricing-txn parent)
 			    )
-			   ((same-account? current (xaccSplitGetAccount s))
+			   ((equal? current (xaccSplitGetAccount s))
 			    (set! txn-units (xaccSplitGetAmount s)))
 			    
 			      )
@@ -375,7 +369,7 @@
 		       (for-each
 			(lambda (s)
 			  (cond
-			   ((same-split? s split) 
+			   ((equal? s split) 
 ;;                       (gnc:debug "amount " (gnc-numeric-to-double (xaccSplitGetAmount s))
 ;;                                  " acct " (xaccAccountGetName (xaccSplitGetAccount s)) )
 ;;                       (gnc:debug "value " (gnc-numeric-to-double (xaccSplitGetValue s))
