This restriction exists as when parsing import_tasks, ansible does not have access to host vars. The reason is that import_tasks is a pre-processor, and cannot be conditional, and using a host var or fact, may cause pathing to change depending on the host.
As such, you will need to convert your import_tasks to include_tasks to support this functionality.