This patch is based on a suggestion from Ben Wong. Thanks: Ben Wong <galadriel@wongs.net> Closes: #874680