Query raster data even when there's no queriable layer displayed

Should fix #719.
Please review.