Ensuring lock #timeout= behavior is consistent based on locked state

Closes #299