This is a follow-up patch of https://review.opendev.org/#/c/656456/ During the review, it turns out that the logic is too deep and we cannot add more "if" clause. This commit tries to address it. Change-Id: If133b1bed8ae1a591c4ce34e0a86d6dc1c138c68