Replace calls to ->coreApplication with correct self::