Fixes LPS-42940; Pull request 1251 from upstream