Backport xxxcountryFree support from master (bug 12192)