Fixed a bug that affected cached parametrized queries.