Not sure if this is the main issue but I don't think one can use "oldMap" for "Insert" triggers.

For sanity check try removing "Before Insert" from the trigger signature and see if you can compile it now. If so, you may have to modify the trigger to use newMap wherever possible and when you need oldMap ensure the code is within isUpdate block.