Logic was correct as originally submitted. This reverts commit 77eea3dd66cc47554bd7e9269975e91fe73f8b75.