[Git][ghc/ghc][master] compiler: fix redundant AP thunk codegen when not using -ticky-ap-thunk