When you attempt to wipe the iphone and set it up as your own, yes that is called icloud locked. That is a security feature, so the previous owner must wipe it first so their ID is not on it anymore and its unlocked, then you can enter your own ID and password and set the iphone up as your own.
Keep in mind also you cannot turn off find my iphone either so if the iphone is turned on right now, then its notifying the owner where on the map the phone is located. If you bought the iphone used then you need to verify this before buying it, and if they cant wipe it then most likely the iphone is stolen.
No there is no way around it.