Fix locking of core text categories