Use the name method which localizes properly, instead of lastLocalizedName. (#936)

This fixes issue #936.