See enterWebapp() comment. Perhaps a final AtomicInteger