TESTS: added regression tests for #565, #566 and #567.
TESTS: added regression tests for #565, #566 and #567.

iArnold/red,vehar/red,vehar/red,rheber/red,red-eco/red,iArnold/red,rheber/red,NikolayShubenkovProgSchool/red,red-eco/red,NikolayShubenkovProgSchool/red