Don't throw illegal state for reentrant write locking

Signed-off-by: Ross Allan <rallanpcl@gmail.com>