For 15176; Shadow would like this. Based on a patch by Rob Jansen, but revised to have a minimal-sized diff.