tm: fix fr_inv_timeout bug from commit d244686dc5f

	* also improve code readability with a couple of macros