order items alphabetically if weights are the same
use id instead of title
made the fix more generic and robust
included @colemanw 's doc update
Merge pull request #4629 from systopia/CRM-15665

CRM-15665