gldriver: Fix a possible use-after-free
g_hash_table_insert() frees the given key if it already exists in the hashtable. But since we use the same pointer in the following line, use g_hash_table_replace() which will free the old existing key instead.
Was going through the code and noticed this one. Never noticed any occurrence of bugs due to this though.