this commit is related to the following BZs: BZ-983444 BZ-999950 BZ-1005997

note: each issue had some impact on another one... so in the end it was hard to split commits.