I think you would be ok. I have done this many times and the only time it was ever questioned the inspector wanted to make sure the old wire did not connect directly to a light fixture.