TODO meld this commit into initial (fixes CDI circularity bug)