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