Enabling latedef lint check.

Part of #360.
Declare helper function variables up top, followed by exported functions, followed by helper function definitions.