Patch contributed by Bruno Santos Resolves patch request https://bugs.openfoam.org/view.php?id=2684
See also commit 30e2f912e5
30e2f912e5