Add tests for IDictionary and IDictionary<,>; fix bug they uncovered.