Fixed the typing bug. The error was in the typing constraints generated for LF judgements. This seems to be working correctly now.