Fixes #5666
Merge pull request #5681 from mwerezak/looc

Fixes #5666