SQL insert in taxonomy_index doesn't work
I think in D7, you can not use db_query() for insert operations - db_query() can be used only for Select and you should use db_insert() for insert operation.

For your 1st code bloc, perhaps the db_insert() causes 1st row with blank values - since it expects fields and values for 1st row. The subsequent $query->values() adds a second row. This may explain the blank values in dvm().