Resolves bug-report https://bugs.openfoam.org/view.php?id=4035 Patch contributed by Stanislau Stasheuski, Aalto University.