fix problems in DBS3Reader, fixed #5412

I *think* this fixes the issues in #5412, but please review as I don't know what the original code was attempting to do. These are the most obvious changes in how to make the code at least not immediately have python complain about syntax errors, but I can't be 100% sure they will make for functionally correct code.