Made extern stages and functions work in the C backend.