bst shell -b ${ELEMENT} throws assertion when source not present

Summary

When running bst shell -b ${element} on an element that is not cached locally, an assertion is thrown

What is the current bug behavior?

buildstream@be88ff14eeb6:~/project$ bst shell -b boost.bst
[--:--:--][        ][    main:core activity                 ] START   Loading elements
[00:00:00][        ][    main:core activity                 ] SUCCESS Loading elements
[--:--:--][        ][    main:core activity                 ] START   Resolving elements
[00:00:00][        ][    main:core activity                 ] SUCCESS Resolving elements
[--:--:--][        ][    main:core activity                 ] START   Resolving cached state
[00:00:00][        ][    main:core activity                 ] SUCCESS Resolving cached state
[--:--:--][        ][    main:boost.bst                     ] START   Staging dependencies
[00:00:00][        ][    main:boost.bst                     ] SUCCESS Staging dependencies
[--:--:--][        ][    main:boost.bst                     ] START   Integrating sandbox
[00:00:00][        ][    main:boost.bst                     ] SUCCESS Integrating sandbox
[--:--:--][        ][    main:boost.bst                     ] START   Staging sources
[--:--:--][        ][    main:core activity                 ] START   Terminating buildbox-casd
[00:00:00][        ][    main:core activity                 ] SUCCESS Terminating buildbox-casd
[--:--:--][        ][    main:core activity                 ] BUG     

    Traceback (most recent call last):
      File "/usr/local/bin/bst", line 10, in <module>
        sys.exit(cli())
      File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__
        return self.main(*args, **kwargs)
      File "/usr/local/lib/python3.7/dist-packages/buildstream/_frontend/cli.py", line 235, in override_main
        standalone_mode=standalone_mode, **extra)
      File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main
        rv = self.invoke(ctx)
      File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke
        return callback(*args, **kwargs)
      File "/usr/local/lib/python3.7/dist-packages/click/decorators.py", line 27, in new_func
        return f(get_current_context().obj, *args, **kwargs)
      File "/usr/local/lib/python3.7/dist-packages/buildstream/_frontend/cli.py", line 667, in shell
        pull_dependencies=pull_dependencies)
      File "/usr/local/lib/python3.7/dist-packages/buildstream/_stream.py", line 234, in shell
        usebuildtree=buildtree)
      File "/usr/local/lib/python3.7/dist-packages/buildstream/element.py", line 1964, in _shell
        with self._prepare_sandbox(scope, directory, shell=True, usebuildtree=usebuildtree) as sandbox:
      File "/usr/lib/python3.7/contextlib.py", line 112, in __enter__
        return next(self.gen)
      File "/usr/local/lib/python3.7/dist-packages/buildstream/element.py", line 1430, in _prepare_sandbox
        self.stage(sandbox)
      File "/usr/local/lib/python3.7/dist-packages/buildstream/buildelement.py", line 233, in stage
        self.stage_sources(sandbox, self.get_variable('build-root'))
      File "/usr/local/lib/python3.7/dist-packages/buildstream/element.py", line 903, in stage_sources
        self._stage_sources_in_sandbox(sandbox, directory)
      File "/usr/local/lib/python3.7/dist-packages/buildstream/element.py", line 1463, in _stage_sources_in_sandbox
        self._stage_sources_at(host_vdirectory, usebuildtree=sandbox._usebuildtree)
      File "/usr/local/lib/python3.7/dist-packages/buildstream/element.py", line 1500, in _stage_sources_at
        assert self._source_cached()
    AssertionError

What is the expected correct behavior?

A nice error is shown