Fix a cache issue due to the usage of non-parametrized ID queries

Fixes #6