Modules: Use Variable.Priority to handle module priorities. Preparation for fixing [bug 7611 (#7611)].