The condition if (model is DynamicObject) moved below DynamicDictionaryValue because it was "less restrictive". And the DynamicDictionaryValue would never be reached