fix importing bug (STUD-1599)

add target_location_namespace check
Merge pull request #3626 from edx/adam/fix-import-bug

fix importing bug (STUD-1599)