Add assertions to not accidentally build multiple functions at the same time