The location information is entered into the database when the definition is executed, by the defining function calling record-definition.
record-definition performs various checks, and returns true or false depending on whether the definition was allowed or not. In particular, it checks if the same name has already been defined in a different location and if so a warning or error can be signalled. See record-definition for details.
LispWorks User Guide and Reference Manual - 21 Dec 2011