We don't actually want Coverity to complain when a BUG() check can never fail, since such checks can prevent us from introducing bugs later on. Closes ticket 23054. Closes CID 1415720, 1415724.