Remove unnecessary query.

Fixes gh-285