8179950: Custom system class loader using Enum.valueOf in its initialization triggers java.lang.InternalErrorReviewed-by: alanb, dfuchs, lancea