Move assert above first use of variable that we'd be asserting on.