I had experienced this problem everytime I warmed up my e38 740i in less than 15minutes. I thought the atf was not properly pumped into the valve body. Try to warm up at least 15minutes. This problem occurred anytime although I changed the filter and atf. If I warmed up within or more than 15minutes, my gearbox will run smoothly all the way. I replaced my gearbox 2times since I bought it.
This problem happened on my dad's e38 735iL (tiptronic) too. But his gearbox was not in good working order before the faulty appeared, so had to replace the damaged gearbox. He replaced his gearbox 4times since he owned it.
If your gearbox shifts gear smoothly before the faulty appears then your gearbox is still alright. If your gearbox shifts roughly before, then you have to replace your gearbox.