Debugging the ~/.profile from hell

I fixed a long standing bug in my ~/.profile for pdksh that would make it complain about a missing "]". I never found the bug, it's hard to debug 600+ lines of shell-script for that sort of error, but by changing all test to use the "[[" syntax instead of the "[" syntax it disappeared. It's annoying when bugs get fixed by accident, not by analysis and calculated change, it suggests sloppiness on my part or maybe bugs in ksh(1) in the first place. The latter is by far the less likely.