Add regression test for the bases scoping bug fixed in previous commit
This one: f26bc4180b3e317c8890c3bb51d9b24b751aba8c