Last dot in 'to' path of dependency is removed properly