Since this is a sensitive branch, let's try to keep the diffs specific to solving this problem.  This changes the order of execution, and I don't want to worry about whether that's important if it's not necessary for this change.