fix #17316. Don't overwrite reference path

when <Reference> project item has Condition attribute