Hi,
No it is not a bug.
Only when you are replaying this step only the LoadRunner execution engine (AKA mdrv) is not being used, it is a pure JavaScript execution without any LoadRunner context.
As so, you can't use LoadRunner related APIs in this form.
It is also documented.
Thanks.