Speaker is not working during phone calls
So I completely forgot about asking this question until someone upvoted it. (Thank you).

I 'fixed' it by sending my Xperia to Sony after another defect occured (headphone jack didn't recognize when something was plugged-in). Apparently whatever was wrong with the headphone jack caused them to switch out the smartphone. 

I had the same headset and the same android version on that smartphone for some time and it worked without a problem. So whatever was wrong was most probably either a hardware problem or an error that occured during the upgrade procedure (maybe something wasn't installed correctly).