Added 'lock' on get

Had lock on set, so should have lock on get. (not sure why this is a
Hashtable rather than a Dictionary<Type, Action<object, TextWriter,
Options>>, but don't see any pressing reason to change it.