Don't overwrite marker when checking if it exists

Checking for the existence of a marker overwrote which marker was being
checked for.  The string representation of the marker needs to be
retained so that a proper exception can be built.  So a new variable is
introduced which can be used to check for marker existence.

Change-Id: I81cfdceca3921c364cdeeccd24add14a6b1d0fd4
Closes-bug: 1257008
Merge "Don't overwrite marker when checking if it exists"