Fixed a regression in 625b8e9295d79650208bfb3fca8bf9e6aaf578e4: improper short-circuiting could lead to a KeyError when threads concurrently call RegexURLResolver._populate(). Backport of 389a5318a06e7e4d8f8aba14af88c4cc4ea0db47 from master