Compilation order during tests

Thank you both @alex88 for reporting the issue and @ericmj for finding the solution <3