Even though they have different names, I view this film as being another story that is about Vincent Hanna (spoilers)
Obviously, Will Dormer and Vincent Hanna have different names. Yet both characters obviously are played by Al Pacino - and both characters are each respected and seasoned LAPD detectives who both have a similar fiery streak in their respective personalities.Quite simply, I view this film as being the epilogue to the life and career of Vincent Hanna. I mean, Hanna totally is the type of detective who we could easily see planting evidence on a killer that he knew to be guilty. That along with the fact that Nolan seems to leave it ambiguous as to if Dormer shot and killed Hap by mistake or on purpose seems like something we can easily see Hanna doing (the fact that Dormer switched pistols before he fired at Hap really seemed sketchy to me - yes, we can hear a very light click sound as he pulls the trigger before reaching for his backup weapon, but even that seemed very ambigious also). I mean, any law enforcement/trusted authority figure who is a regular cocaine user such as Hanna, would in theory have no problem with breaking laws/policies when nobody is looking, especially if it is to secure a conviction or save his own ass.
I know that Nolan is a HUGE fan of Heat, so I really would not be surprised if this was his intent while making this film.