Discussed this a bit now, would it be possible to have a specific struct here instead, like Criterion \MapLocationDistance\<something>Struct ? It could defined the functions you need from SplStack in interface even, and internally extend it.