Very interestingly, this problem did not occur in our testing environment.
As a matter of fact, this problem was also reported by another user using Moodle 2.1 (https://moodle.org/mod/forum/discuss.php?d=191482). Thus, this should not be a problem specific to Moodle 2.4 only. Just we don't know how and when this problem is triggered. Is it a bug of Moodle? Nonetheless, may i suggest Moodle to add this important step into the upgrade procedure such that users know how to troubleshoot when this problem happens?
Thank you for your kind attention.