Fix the fix to type queries.

Should have been included in the original commit.