Fixed bug in getCodeUnits(). Added simple recursive test.