When searching for a patron to act as a guarantor, if the guarantee's record is returned it can be selected, therefore becoming his/her's own guarantor. This makes no sense. To reproduce: 1) Create two users, a parent and a child both with the same surname (for example Parent Smith and Child Smith) 2) Edit the child record and under the Guarantor information, use the "Search to add" button to search for a guarantor. 3) Search for Smith. Both Parent Smith and Child Smith will be listed in the results. 4) Select Child Smith and save the user record. Child Smith is now the guarantor for Child Smith.
It seems this behaviour has been fixed in the main branch. You can still select the child's name, but Koha now displays the error 'A guarantor cannot be a guarantee' when trying to save changes. Further testing may be needed to confirm.
*** This bug has been marked as a duplicate of bug 37892 ***
It's not actually a duplicate of the bug marked as, but this issue has been solved by it