Fix doctest option string processing

Added an explicit from doctest import OPTIONFLAGS_BY_NAME. The presence of
option flags was causing exceptions because OPTIONFLAGS_BY_NAME was not
visible.