Humour is subjective. I thought that the dialogue could have been funny, but Capaldi, being a more mature actor, couldn't carry the notion that the Doctor felt threatened by someone who was younger and better looking than himself in the right way.
Matt Smith would have come across as being put out that Clara's head had been turned by someone he didn't think existed, and David Tennant's Doctor, with that little underlying streak of narcissism, would have been much better placed to make the scenes work.
I think the real problem would have been that the writers, including Mr Moffat, probably had no idea how the character would be played during pre production. For me, those scenes fell a bit flat because of that. I can't really describe it any better, but one of things that I've thought is that Mr Capaldi has a more serious face!