Fix patch execution order
Merge pull request #822 from romainneutron/patch-order

[3.8] Fix patch execution order
Merge branch '3.8'

Conflicts:
	lib/classes/base.php