So now go to 240.4...
Is the #8 protected by a 50A c/b (as required by 625.41) in accordance with it's ampacity specified in 310.15 (an ampacity of 40)?
The answer is no. A conductor with an ampacity of 40 cannot be protected by a 50A c/b, so you need a larger conductor.