Re-introducing change from https://github.com/yade/trunk/commit/ab91b3cf8654f6d563dede10184e784a8ce84219, reverted since, without reason