I think I have solved this issue myself.
I have installed a plugin called "Outerbridge Nested Shortcodes", and that did the trick. I just had to edit that plugin's code to increase its priority from 10 to 9 (the lower the number, the higher the priority) and it started working.