While doing a full compile in AX, I received the following error:
I know that permissions hadn't changed so it couldn't have been an issue with that.
Recently, some maintenance had been performed on this environments SQL and AOS servers so I decided to give SQL a reboot first, followed by the AOS server.
This did the trick! Compile worked fine after that.