It seems worth investigating why this doesn't optimize down to the same code.