Issue #1678800 by rszrama, andyg5000: properly default the mode in addressfield_generate() if it is not set in the context array.