Taken from in a comment in #1406 posted by @mMontu.
