Return $self from assertions, to make them easier to chain.
Assert that the stack is not locked as soon as possible.

This prevents a long delay when you try to modify a stack
that is already locked.