(thanks to Yura for spotting - $SUBJECT was broken as $rev was not set at the time $SUBJECT was set). (Logical change 1.690)