Work around JDK stupidity with regards to thread count