[slapos_rest_api] Fix Filtering of instances

  This implementation is not optimal from performance point of view,
  however the fix is more urgent and the current implementation has
  nearly the same performance outcome.

  Optimisation should come later on query less objects per time.