I noticed that un-including access/heapam.h from the following files
leaves things just fine.
src/backend/commands/aggregatecmds.c
src/backend/commands/collationcmds.c
src/backend/commands/conversioncmds.c
src/backend/commands/lockcmds.c
It seems any calls into heapam.c that there used to be have since moved to
the corresponding backend/catalog/* files or elsewhere.
Attached a patch.
Thanks,
Amit