closure compiled in correct order