AS7-6683

rebased PR that supersedes #4203