Normally you won't see 2x4s as rafters unless in small enclosures. As you pointed out, your 2x4s may not fail for strength by code but may or may not meet the code for deflection. Just for others benefit, usually 2 criteria are involved in designing a structure.... strength and deflection. They are independent of each other and specified by code.
I too own other houses but haven't noted any roof problems when I owner financed them to others. None of them had 2x4's as rafters. Now if it happens it's their worry <grin>.