bugfix: stack overflow exception. Including test for CharSequenceAdapter.