Fix obscure file locking problem with shelf if object containing a shelf is referenced in an exception context.
Fix obscure file locking problem with shelf if object containing a shelf is referenced in an exception context.

cmc333333/regulations-parser,tadhg-ohiggins/regulations-parser,tadhg-ohiggins/regulations-parser,cmc333333/regulations-parser,eregs/regulations-parser,eregs/regulations-parser