Moved adding of USE flags earlier so it doesn't cause problems