Mark a module for update after setting its status to prevent race
conditions.

(cherry picked from commit ae6507390d1357d63bfdd7daf42ace263bcb7044)