Fix processing of target-text-ids in query (following https://github.com/wolfgangmm/ShakespeareDemo/commit/42cd4d4)