I found another bugs (maybe they came after the fix). The sequence of actions to reproduce (the screenshots is attached):
1. Switch to the "Categories" tab
2. Create any group
3. In the group create first category (e.g. "cat1")
4. Switch to the "Expenses" tab
5. Add a record with created category ("cat1") and any value (e.g. 100)
6. Switch to the "Categories" tab
7. In the created group, create second category (e.g. "cat2")
8. Switch back to the "Expenses" tab
9. Now we have the first bug! Our value in the created record is invisible (screenshot #4)
10. Then switch to the "Categories" tab and delete "cat2"
11. Switch back to the "Expenses" tab
12. Here is the second bug. Now, if you try to add a new record (or edit the created record) you will see that the deleted category still exists!