Define mvn() function only once

Change-Id: I97e3813b1145f35cc5daa232cbe1f0674f3f89fc