Avoid infinite recursion with namespace import

Reported-By: Sergei Gavrikov <sergei.gavrikov@gmail.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>