NXP-13795: Refactor to prevent deadlock