Correctly determine decomposition type
Only search for the first input character, update tree when no decomposition data is found