[JENKINS-53858] fix implementation of double-check-locking
[JENKINS-53858] fix implementation of double-check-locking

Signed-off-by: Nicolas De Loof <27d8e526c390473e9c51da80626c6b0539b42f4f@gmail.com>

mkozell/ec2-plugin,jenkinsci/ec2-plugin,jenkinsci/ec2-plugin,mkozell/ec2-plugin,jenkinsci/ec2-plugin,jenkinsci/ec2-plugin,mkozell/ec2-plugin,mkozell/ec2-plugin