Proper fix for origin bug using src rect size

The previously committed fix wasn't working in all cases.