1467 fix

This is a rebased and fixed #1467 
@bradleypriest this seems to have slipped through. Will be fixed later by SSOT, but seems like a valuable addition. I am a bit shaky on the semantics can you or @wycats double check?