Correct lock bug (closes #4118)