FIX: Globals template plugin should return (doc, value) tuple.