[FIXED MGWT-372] ServiceDefTarget unnecessarily imported in some cases; add test cases