Fixing build issues with references within repository