Follow-up fix for bug#7369. Fixed unit tests.