The scientist's lockbox is hidden. You'll need to knock down one of the flame spitting statues to find the dynamite beneath it, then connect it to he TNT plunger with the wire pencil. Blow up the wall and you'll find the area with the lockbox. The rainbow box has too many colors for a single key, so you can just use your sword to cut the rope that is inside it.
Being able to walk outside of the level is definitely a bug. We will be looking into it!