Lps 51891

It should work this time.

@zsoltbalogh for backport, you don't need the last 3 commits.