Fixed bug 5502 + document + test
Merge remote branch 'cristian/fix-#5502' into next