tweaks to theme favourites script (bug 863758, bug 865860)