[issue547] add new special case for 'from x import y'; update tests