[3.8] Fix patch execution order