Fix bug with test dublicationd for test run

Before this fix when test run was started and this test run must have
included tests that had been executed earlier with another test run
multiple copies for current test run were created which leads to
messed up ui. To avoid this query for tests from which copies will be
created was extended to provide correct results.

Change-Id: I8b9cca4c57ee973e4f818ecdc6079b24f108f555