Fix NPE when searching  real-time with a non-existing dimension

Fixes #761