core.c: CAF merge fixes