Switch core detection

We can't rely on configuration being available when this file is loaded.
So instead we rely on Core being defined.