I don't know why I didn't see this optimization earlier...