Catch InvalidKeyError in UserTagsEventContextMiddleware and static_tab view.

LMS-11189