Clean-up multi-instance in created or updated style.

We really want to have the multi_priority starting from 0 and increasing
one by one for every multi-instance module.

This is an attempt to fix multi-instance and style. Ideally something similar should be done for partial copy/paste, but it seems lot more difficult to implement.

Anyway, please test/review this if possible as we need this for 1.2 I would say.