Issue #1062634: correct order of operations in the preprocess functions.