Fix check for lockdir when attribute is missing