[rake-builder] improved rebuild dependency rule