If you use this script that Glenn wrote it will greatly enhance the ability to locate these type of issues.
Sanity() - Performs a "sanity check" on KiX scripts