Possible solution for #2677
Further work on #2755