Improve the logic for mapping target dynamic partitions.
am: 1d9077f65d

Change-Id: I5a9d691f13946d3b77a532dea29e8345296fcdbd