Fixed check for detach object in HRuleRef::do_detach(). Added comments explaining current state of affairs, removed impossible checks.