I'm not sure how this was ever working as per this article:
Wrong! You cannot, must not, EVER use path_to_theme() outside of either a theme function or template.php. If you do, it will not return what you expect it to return. Instead of the path to your theme, you'll get a seemingly arbitrary path to the last invoked module. Because modules are not supposed to have anything to do with themes, you have no business calling path_to_theme() in a module anyway.