Removed some code that was causing problems and wasn't even needed. Now, there are no more problems when setting the preview range from the Action Editor when it was displaying an action that was scaled in the NLA.