fix crash when assigning memoryviews through ternary conditional expressions